//
//  GYConfirmOrderStore.m
//  GoodLuck
//
//  Created by 郭为勇 on 2018/3/28.
//  Copyright © 2018年 yunjiazhineng. All rights reserved.
//

#import "GYConfirmOrderStore.h"
#import "GYconfirmOrderGoods.h"

@implementation GYConfirmOrderStore

+ (NSArray *)jsonConfirmOrderStore:(NSArray *)source {
    NSMutableArray *models = [NSMutableArray array];
    for (NSDictionary *dic in source) {
        GYConfirmOrderStore *store = [[GYConfirmOrderStore alloc] initWithDic:dic];
        [models addObject:store];
    }
    
    return models;
}

- (instancetype)initWithDic:(NSDictionary *)dic {
    self = [super init];
    if (self) {
        
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    
    if ([key isEqualToString:@"goods_list"]) {
        self.goods_list = [GYconfirmOrderGoods jsonConfirmOrderGoods:value];
        
        return;
    }
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

@end
